import {
  Entity,
  Column,
  PrimaryGeneratedColumn,
  UpdateDateColumn,
} from 'typeorm';
@Entity()
export class FileList {
  @PrimaryGeneratedColumn('uuid')
  id: string;

  @Column({ default: '' })
  file_name: string;

  @Column({ default: '' })
  original_name: string;

  @Column({ default: '' })
  src: string;

  @Column({ default: '-1' })
  folder_id: string;

  @Column({ default: '' })
  raw_type: string;

  @Column({ default: '' })
  size: string;

  @Column('enum', { enum: ['person', 'group'], default: 'person' })
  role:string

  // LLM 知识库 素材推荐做准备
  @Column('simple-array',{default:''})
  tags:string[]  //数据库存储空值时候，tags 会默认为 []

  @Column({
    type: 'timestamp without time zone',
    default: () => 'CURRENT_TIMESTAMP',
  })
  create_time: Date;

  @UpdateDateColumn({
    name: 'update_time',
    type: 'timestamp',
    default: () => 'CURRENT_TIMESTAMP'
  })
  update_time: Date;

  @Column({ default: '' })
  uploader: string;
}
